<template>
	<view class="invi-bg">

		<view class="order-bg">
			<view class="order-type bgfff">
				 <u-tabs :list="typeList" @change="changeType" ></u-tabs>
			</view>
			<view v-if="type==1">
				<orderMine />
			</view>
		    <view v-else>
		    	<orderShare />
		    </view>

		</view>
	  
	</view>
</template>

<script>
	import orderMine from './order_Mine.vue'
	import orderShare from './order_share.vue'
	export default {
		components:{
			orderMine,orderShare
		},
		data() {
			return {
				typeList: [{name:'推广订单',type:1}],
				type:1,
				current:'',
			}
		},
		onLoad() {
			this.judgeStatus()
		},
		methods: {
			changeType(index){
				this.type = index.type;
			},
			judgeStatus(){
				let status = uni.getStorageSync('isInvitation')
				if(status==1){
					let temp = {name:'提成订单',type:2}
					typeList.push(temp)
				}
			},
		}
	}
</script>

<style scoped lang="scss">
.invi-bg{
	height:100vh;
	background: #f5f5f5;
}
.bgfff{
	background: #fff;
}
.order-type{
	display: flex;
	justify-content: center;
	padding-bottom:20rpx;
}
</style>